1. Field of the Invention
This invention relates to a digital resistance comparator circuit used as a switch detector. More generally, this invention relates to a circuit which compares an input resistance to a reference resistance and provides a logical 1 or 0 output indicative of the relative values of the compared resistances. In the preferred embodiment a logic 0 occurs at the output when the input resistance is less than the reference resistance and a logic 1 occurs at the output when the input resistance is more than the reference resistance.
2. Background of the Invention
As mechanical switches, such as poppel switches, elastomer switches and even toggle switches, wear with a combination of use and exposure to the environmental elements, the resistance at the switch contacts increases until the switch is deemed unusable. While the contact resistance of new switches may intitially only be a fraction of an ohm, the contact resistance of worn switches has been measured at as much as 20K ohms. Such drastic changes in contact resistance can create a serious reliability problem. It is therefore desirable to extend the useful life of the switch by electronically positively detecting the closing of a switch contact over an extended range of contact resistances.
A standard prior art switch-to-ground detect circuit is shown in FIG. 1. In this circuit the input 10 of inverter 15 is connected to a first terminal of resistor 20. The second terminal of resistor 20 is connected to a positive DC voltage supply. Also connected to the input 10 of inverter 15 is a switch 25. The switch is connected from input 10 to ground in normal operation. The output of the detection circuit is taken at the output 30 of inverter 15.
In operation, the input 10 is normally pulled to a logical high voltage level by resistor 20 which is connected to the DC source resulting in a logic low appearing at output 30. . When the user closes switch 25, the contact resistance is effectively connected from the input 10 to ground. If this resistance is sufficiently small, the voltage at input 10 will drop below the transition voltage of inverter 15 causing a logical high to appear at output 30 indicating a switch closure has occurred.
Although the simple circuit of FIG. 1 operates adequately for most applications, it has a number of serious drawbacks which prohibit its use in conjunction with many low voltage, low current electronic devices such as electronic paging receivers. Such devices typically operate from a single small low capacity battery which supplies a voltage on the order of 1.2 to 3 volts. In such low supply voltage environment, the gain of the CMOS inverter used in the prior art circuit is much lower than normal especially at temperature range extremes. This results in inverter 15 operating in more of a linear fashion having an output inversely proportional to the input resistance 25 rather than having a sharply defined logical transition which occurs at a fixed, predetermined point. As a result, the prior art circuit could prematurely fail to give a positive indication of switch actuation. Also, the contact resistance at which the circuit no longer functions is heavily dependent upon the fabrication processing parameters of inverter 15. This renders the characteristics of the prior art circuit highly unpredictable at best.
Furthermore, many pagers and similar devices require an extremely low standby current drain, often less than 1.5 mA, which allows even a single penlight type battery to last for weeks. For the circuit of FIG. 1, the value of pull-up resistor 20 is generally on the order of 30K ohms. This value allows reliable switch operation even at 20K ohms of contact resistance while making the circuit relatively immune to stray input resistance to ground caused by P.C. board corrosion, etc. Unfortunately, this value predetermines that this prior art circuit will utilize between 50 and 300 microamps during standby even assuming a low power CMOS inverter is used. For low current devices such as paging receivers, this is an unacceptably high current drain resulting in substantially shortened battery life. Therefore, it is impractical to attain any of the advantages afforded by the prior art switch detect circuit in low current, low voltage electronic devices.